﻿using Microsoft.Extensions.Configuration;
 
using System.IO;
using System.Text;

namespace SampleHttpClient
{
    public static class ConfigurationManager
    {
        public static IConfigurationRoot GetSection()
        {
            try
            {
                var configura = new ConfigurationBuilder()
                           .SetBasePath(Directory.GetCurrentDirectory())
                           .AddJsonFile("appsettings.json")
                           .Build();
                return configura;
            }
            catch
            {
                return null;
            }
             
        }
    }
}
